var express = require('express');
var router = express.Router();

const {getLogs,addLogs,setLogs} = require('../service/logsService');

//获取日志
router.post('/getLogs',async (req,res,next)=>{
  const msg = req.body;
  const data = await getLogs(msg);
  res.send(data)
})
//修改日志数据
router.post('/setLogs',async (req,res,next)=>{
  const msg = req.body;
  const data = await setLogs(msg);
  res.send(data)
})
//新增日志
router.post('/addLogs',async (req,res,next)=>{
  const msg = req.body;
  const data = await addLogs(msg);
  res.send(data)
})

module.exports = router